package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"`
	Password string `gorm:"type:varchar(32)"`
}
type File struct {
	gorm.Model
	Name      string `gorm:"type:varchar(50)"`
	Title     string `gorm:"type:varchar(255)"`
	Img       string `gorm:"type:varchar(255)"`
	UserID    int    `gorm:"type:int"`
	User      User   `gorm:"foreignKey:UserID"`
	FileCount int
	CollCount int
}
type Like struct {
	gorm.Model
	UserID int  `gorm:"type:int"`
	User   User `gorm:"foreignKey:UserID"`
	FileID int  `gorm:"type:int"`
	File   File `gorm:"foreignKey:FileID"`
}
type Coll struct {
	gorm.Model
	UserID int  `gorm:"type:int"`
	User   User `gorm:"foreignKey:UserID"`
	FileID int  `gorm:"type:int"`
	File   File `gorm:"foreignKey:FileID"`
}
